var app = getApp()
Page({
    data: {
        products: null
    },
    onLoad: function () {
        var that = this
        wx.request({
            url: 'https://www.zhaoyg.cn/index/product',
            data: {},
            method: 'GET', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
            // header: {}, // 设置请求的 header
            success: function (res) {
                // success
                that.setData({
                    products: res.data
                })
            },
            fail: function () {
                // fail
            },
            complete: function () {
                // complete
            }
        })
    }
})
